from django.forms import ModelForm
from idx.models import User, Hotel, Admin, idcard, Room

# 用户表单
class UserForm(ModelForm):
	class Meta:
		model = User
		fields = '__all__' # username, password

# 管理员表单
class AdminForm(ModelForm):
	class Meta:
		model = Admin
		fields = '__all__' # username, password

# 身份表表单
class IDCardForm(ModelForm):
	class Meta:
		model = idcard
		fields = '__all__' # name, cid, user

# 酒店表单
class HotelForm(ModelForm):
	class Meta:
		model = Hotel
		fields = '__all__'

class RoomForm(ModelForm):
	class Meta:
		model = Room
		fields = '__all__'
